//
//  SecondTableViewCell.m
//  Mother
//
//  Created by 郭明皓 on 16/6/21.
//  Copyright © 2016年 郭明皓. All rights reserved.
//

#import "SecondTableViewCell.h"

@implementation SecondTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}


- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self create];
    }
    return self;
}

- (void)create {
    
    self.backView = [[UIView alloc]init];
    [self.contentView addSubview:_backView];
    
    self.LabelLeftimage = [[UIImageView alloc]init];
    [self.backView addSubview:_LabelLeftimage];
    
    self.rightButton = [UIButton buttonWithType:UIButtonTypeSystem];
    [self.backView addSubview:_rightButton];
    
    self.topImage = [[UIImageView alloc]init];
    [self.backView addSubview:_topImage];
    
    self.leftImage = [[UIImageView alloc]init];
    [self.backView addSubview:_leftImage];
    
//    for (int i = 0; i < ; <#increment#>) {
//        <#statements#>
//    }
//    self.rightImage = [[UIImageView alloc]init];
//    [self.backView addSubview:_rightImage];
}
- (void)layoutSubviews {
    [super layoutSubviews];
    
    self.backView.frame = CGRectMake(0, 0, CELLWIDTH, CELLHEIGHT);
    self.LabelLeftimage.frame = CGRectMake(10, 10, 30, 30);
    self.rightButton.frame = CGRectMake(40, 10, 100, 30);
    self.topImage.frame = CGRectMake(10, 40, CELLWIDTH - 20, 150);
    
    self.leftImage.frame = CGRectMake(10, 200, CELLWIDTH / 2 - 20, 100);
//    if (<#condition#>) {
//        self.rightImage.frame = CGRectMake(CELLWIDTH / 2, 200, CELLWIDTH / 2 - 10, 100);
//    }
    

}

















@end
